package com.guojiaming.shop;

import com.guojiaming.shop.config.MyGlobalConfig;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;

/**
 * @author vivo
 */
@SpringBootApplication
@MapperScan("com.guojiaming.shop.dao")
public class ShopApplication {

    @Bean
    @ConfigurationProperties(prefix = "my.config")
    public MyGlobalConfig myGlobalConfig() {
        return new MyGlobalConfig();
    }

    public static void main(String[] args) {
        SpringApplication.run(ShopApplication.class, args);
    }
}
